<?php 

if(basename(__FILE__) == basename($_SERVER['PHP_SELF'])){
  die;
}
$dbHost = "localhost";        //Location Of Database usually its localhost
$dbUser = "root";            //Database User Name
$dbPass = "";            //Database Password
$dbDatabase = "research";       //Database Name
 
$db = mysql_connect("$dbHost", "$dbUser", "$dbPass") or die ("Error connecting to database.");
mysql_select_db("$dbDatabase", $db) or die ("Couldn't select the database.");


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Simple column chart</title>
</head>
<body>
  <script type="text/javascript" src="http://www.google.com/jsapi">
  </script>
  
  <script type="text/javascript">
  //load the Google Visualization API and the chart
  google.load('visualization', '1', {'packages':['columnchart','piechart']});

  //set callback
  google.setOnLoadCallback (createChart);

  //callback function
  function createChart() {

      //create data table object
      var dataTable = new google.visualization.DataTable();

      //define columns
      dataTable.addColumn('string','Quarters');
      dataTable.addColumn('number', 'Visits');
      dataTable.addColumn('number', 'Pageviews');
      dataTable.addColumn('number', 'Visitors');
      dataTable.addColumn('number', 'Hello');

      //define rows of data
      dataTable.addRows([
                          ['Tháng 1',1037, 4152, 780, 600], 
                          ['Tháng 2',1116, 5951, 857, 600],
                          ['Tháng 3',2439, 5183, 1924, 600],
                          ['Tháng 4',3868, 7641, 3095, 600]
                      ]);

      //instantiate our chart objects

      var chart = new google.visualization.BarChart (document.getElementById('chart'));

      //define options for visualization
      var options = {width: 800, height: 400, is3D: true, title: 'VietCoding Stats'};

      //draw our chart
      chart.draw(dataTable, options);
  }
  </script>
  
  <!--Divs for our charts -->
        <div id="chart"></div>
        <div id="Chart2"></div>
  "
</body>
</html>